import { service } from '@/utils/request'

export function getAllType() {
    return service({
      url: `/api//course_type/get`,
      method: 'get'
    })
}

export function addType(type) {
  return service({
    url: `/api//course_type/add?type=${type}`,
    method: 'post'
  })
}

export function editType(id, type) {
  return service({
    url: `/api//course_type/update/${id}?type=${type}`,
    method: 'put'
  })
}

export function deleteType(id) {
  return service({
    url: `/api//course_type/del/${id}`,
    method: 'delete'
  })
}